<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>04-v-on</title>
    <script src="./lib/vue-2.4.0.js"></script>
</head>
<body>
    <div id="app">
        <!-- v-on进行事件绑定 -->
        <input type="button" value="ok" v-on:click="show">
    </div>
    <script>
        new Vue({
            el:"#app",
            data:{

            },
            methods:{//在这里定义vue实例所有可用方法
                show: function(){
                    alert("hello");
                }
            }
        })
    </script>
</body>
</html>